<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 6.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/avatar.jpg">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/avatar.jpg">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/avatar.jpg">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">

<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib/pace/pace-theme-big-counter.min.css">
  <script src="/lib/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"raphets.github.io","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"hide","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":"default"},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="本文记录如何通过acme.sh生成免费SSL证书并自动续期。">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux使用 acme.sh 自动申请免费 SSL 证书">
<meta property="og:url" content="https://raphets.github.io/archives/28bf4740.html">
<meta property="og:site_name" content="尚拙">
<meta property="og:description" content="本文记录如何通过acme.sh生成免费SSL证书并自动续期。">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2024-06-12T10:58:54.000Z">
<meta property="article:modified_time" content="2024-06-14T02:18:33.158Z">
<meta property="article:author" content="John Doe">
<meta property="article:tag" content="Linux">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://raphets.github.io/archives/28bf4740.html">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Linux使用 acme.sh 自动申请免费 SSL 证书 | 尚拙</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">尚拙</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">一个分享技术、学习成长的个人博客网站</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
        <li class="menu-item menu-item-tool">

    <a href="/tool/" rel="section"><i class="fa fa-hammer fa-fw"></i>工具</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://raphets.github.io/archives/28bf4740.html">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="John Doe">
      <meta itemprop="description" content="不积跬步，无以至千里；不积小流，无以成江海。">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="尚拙">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Linux使用 acme.sh 自动申请免费 SSL 证书
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2024-06-12 18:58:54" itemprop="dateCreated datePublished" datetime="2024-06-12T18:58:54+08:00">2024-06-12</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2024-06-14 10:18:33" itemprop="dateModified" datetime="2024-06-14T10:18:33+08:00">2024-06-14</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/" itemprop="url" rel="index"><span itemprop="name">技术文章</span></a>
                </span>
                  ，
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%8A%80%E6%9C%AF%E6%96%87%E7%AB%A0/Linux/" itemprop="url" rel="index"><span itemprop="name">Linux</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p>本文记录如何通过acme.sh生成免费SSL证书并自动续期。</p>
<span id="more"></span>

<h1 id="一、acme-sh简介"><a href="#一、acme-sh简介" class="headerlink" title="一、acme.sh简介"></a>一、acme.sh简介</h1><p>acme.sh 实现了 acme 协议, 可以从 Let’s Encrypt 等平台生成免费的证书.</p>
<p>acme.sh的Github项目地址</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">https://github.com/acmesh-official/acme.sh</span><br></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://letsencrypt.org/zh-cn/">Let’s Encrypt</a> 是一家免费、开放、自动化的公益性证书颁发机构（CA）。</p>
<h1 id="二、安装-acme-sh"><a href="#二、安装-acme-sh" class="headerlink" title="二、安装 acme.sh"></a>二、安装 acme.sh</h1><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">curl https://get.acme.sh | sh -s email=my@example.com</span><br></pre></td></tr></table></figure>
<p>或者</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">wget -O -  https://get.acme.sh | sh -s email=my@example.com</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p><a href="mailto:&#x6d;&#121;&#64;&#101;&#x78;&#97;&#109;&#x70;&#108;&#x65;&#x2e;&#99;&#111;&#109;">&#x6d;&#121;&#64;&#101;&#x78;&#97;&#109;&#x70;&#108;&#x65;&#x2e;&#99;&#111;&#109;</a>替换成自己的邮箱</p>
<p>安装成功后，在 root 目录下 ls -a 就可以看到有一个.acme.sh的文件夹</p>
<p>创建一个别名方便使用：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">alias acme.sh=~/.acme.sh/acme.sh</span><br></pre></td></tr></table></figure>

<p>安装时已经为系统创建crontab定时任务，续签证书的调度任务，自动检测所有的证书, 如果快过期了, 需要更新, 则会自动更新证书，可以通过 crontab -l 查看。</p>
<p>安装过程中所有的修改都限制在安装目录~&#x2F;.acme.sh&#x2F;中，因此不用担心对已有的系统任何功能和文件污染。</p>
<h1 id="三、生成证书"><a href="#三、生成证书" class="headerlink" title="三、生成证书"></a>三、生成证书</h1><p>acme.sh 实现了 acme 协议支持的所有验证协议. 一般有两种方式验证: http 和 dns 验证。</p>
<h3 id="1-http-方式"><a href="#1-http-方式" class="headerlink" title="1. http 方式"></a>1. http 方式</h3><p>需要在你的网站根目录下放置一个文件, 来验证你的域名所有权,完成验证. 然后就可以生成证书了。</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d example.com -w /home/wwwroot/example.com</span><br></pre></td></tr></table></figure>
<p>或者</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d example.com -w /home/username/public_html</span><br></pre></td></tr></table></figure>
<p>或者</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d example.com -w /var/www/html</span><br></pre></td></tr></table></figure>

<p>只需要指定域名, 并指定域名所在的网站根目录. acme.sh 会全自动的生成验证文件, 并放到网站的根目录, 然后自动完成验证. 最后会聪明的删除验证文件. 整个过程没有任何副作用。</p>
<p>如果你用的 apache服务器, acme.sh 还可以智能的从 apache的配置中自动完成验证, 你不需要指定网站根目录：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d mydomain.com --apache</span><br></pre></td></tr></table></figure>

<p>如果你用的 nginx服务器, 或者反代, acme.sh 还可以智能的从 nginx的配置中自动完成验证, 你不需要指定网站根目录：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d mydomain.com --nginx</span><br></pre></td></tr></table></figure>
<p>注意, 无论是 apache 还是 nginx 模式, acme.sh在完成验证之后, 会恢复到之前的状态, 都不会私自更改你本身的配置。</p>
<p>acme.sh脚本默认ca服务器是zerossl，如果经常出错可以切换到其他服务器：<br>切换 Let’s Encrypt</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --set-default-ca --server letsencrypt</span><br></pre></td></tr></table></figure>
<p>切换 ZeroSSL</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --set-default-ca --server zerossl</span><br></pre></td></tr></table></figure>
<p>切换 SSL.com</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --set-default-ca --server ssl.com</span><br></pre></td></tr></table></figure>
<p>切换 Google Public CA</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --set-default-ca --server google</span><br></pre></td></tr></table></figure>

<p><strong>支持同时为多个域名生成证书</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue -d example.com -d www.example.com -d cp.example.com -w /home/wwwroot/example.com</span><br></pre></td></tr></table></figure>

<h3 id="2、dns方式"><a href="#2、dns方式" class="headerlink" title="2、dns方式"></a>2、dns方式</h3><p>dns 方式的真正强大之处在于可以使用域名解析商提供的 api 自动添加 txt 记录完成验证。</p>
<p>acme.sh 目前支持 cloudflare, dnspod, cloudxns, godaddy 以及 ovh 等数十种解析商的自动集成。<br>（1）登录到阿里云账号, 生成你的 api id 和 api key,然后进行配置</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">export Ali_Key=&quot;&lt;key&gt;&quot;</span><br><span class="line">export Ali_Secret=&quot;&lt;secret&gt;&quot;</span><br></pre></td></tr></table></figure>
<p>如果是其他平台可以在Github查看使用文档<br>（2）生成证书<br>这里以生成泛域名的证书为例（如果只需要生成一个域名的，直接一个-d接上域名即可）</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --issue --dns dns_ali -d example.com -d *.example.com</span><br></pre></td></tr></table></figure>


<p><strong>如果是DNSPod解析示例如下</strong></p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">export DP_Id=&quot;1234&quot;</span><br><span class="line"></span><br><span class="line">export DP_Key=&quot;sADDsdasdgdsf&quot;</span><br><span class="line"></span><br><span class="line">acme.sh --issue --dns dns_dp -d aa.com</span><br></pre></td></tr></table></figure>
<h1 id="四、安装证书"><a href="#四、安装证书" class="headerlink" title="四、安装证书"></a>四、安装证书</h1><h3 id="1、创建存放证书的文件夹"><a href="#1、创建存放证书的文件夹" class="headerlink" title="1、创建存放证书的文件夹"></a>1、创建存放证书的文件夹</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">mkdir -p /etc/nginx/ssl/edu.lovehistory.top</span><br></pre></td></tr></table></figure>
<h3 id="2、安装证书"><a href="#2、安装证书" class="headerlink" title="2、安装证书"></a>2、安装证书</h3><figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --install-cert -d edu.lovehistory.top \</span><br><span class="line">--key-file       /etc/nginx/ssl/edu.lovehistory.top/edu.lovehistory.top.key  \</span><br><span class="line">--fullchain-file  /etc/nginx/ssl/edu.lovehistory.top/fullchain.cer \</span><br><span class="line">--reloadcmd     &quot;service nginx force-reload&quot;</span><br></pre></td></tr></table></figure>
<p>第一行中的edu.lovehistory.top为申请SSL证书的域名</p>
<h1 id="五、配置SSL证书"><a href="#五、配置SSL证书" class="headerlink" title="五、配置SSL证书"></a>五、配置SSL证书</h1><p>在nginx目录下的conf文件的server模块配置SSL证书</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line">  //监听IPv4的443端口，启用SSL加密</span><br><span class="line">  listen 443 ssl;	      </span><br><span class="line">  // 域名                            </span><br><span class="line">  server_name  edu.lovehistory.top;                                    </span><br><span class="line">  client_max_body_size 1024M;</span><br><span class="line">  //证书地址</span><br><span class="line">	ssl_certificate &quot;/etc/nginx/ssl/edu.lovehistory.top/fullchain.cer&quot;;</span><br><span class="line">  //证书密钥</span><br><span class="line">  ssl_certificate_key &quot;/etc/nginx/ssl/edu.lovehistory.top/edu.lovehistory.top.key&quot;;</span><br><span class="line">  //设置SSL会话缓存，用于存储SSL会话信息以提高性能</span><br><span class="line">	ssl_session_cache shared:SSL:1m;</span><br><span class="line">  //设置SSL会话的超时时间</span><br><span class="line">  ssl_session_timeout  10m;</span><br><span class="line">  //告诉Nginx优先使用在ssl_ciphers指令中指定的密码套件</span><br><span class="line">	ssl_prefer_server_ciphers on;</span><br><span class="line">  //包含/etc/nginx/default.d/目录下的所有配置文件，这些文件通常用于添加额外的配置指令</span><br><span class="line">  include /etc/nginx/default.d/*.conf;</span><br><span class="line">	location / &#123;</span><br><span class="line">          include /etc/nginx/uwsgi_params;</span><br><span class="line">          uwsgi_pass 127.0.0.1:8001;</span><br><span class="line">		  uwsgi_param UWSGI_SCRIPT /usr/local/work_space/le-huo/LeHuo/wsgi.py;  </span><br><span class="line">          uwsgi_param UWSGI_CHDIR /usr/local/work_space/le-huo/; </span><br><span class="line">        &#125;</span><br><span class="line">		</span><br><span class="line">	location /static/ &#123;</span><br><span class="line">        alias /usr/local/work_space/le-huo/static_files/;</span><br><span class="line">    &#125;</span><br><span class="line"> </span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>配置HTTP自动重定向到HTTPS（可选）</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line">    listen 80;</span><br><span class="line">    server_name edu.lovehistory.top;</span><br><span class="line">    return 301 https://$server_name$request_uri;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>

<p>也可以配置HTTPS自动重定向到HTTP：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">server &#123;</span><br><span class="line">    listen 443;</span><br><span class="line">    server_name edu.lovehistory.top;</span><br><span class="line">    return 301 http://$server_name$request_uri;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>


<h1 id="六、更新证书"><a href="#六、更新证书" class="headerlink" title="六、更新证书"></a>六、更新证书</h1><p>安装acme.sh后，所有证书将每60天自动更新一次。</p>
<p>但是，您也可以强制更新证书：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --renew -d example.com --force</span><br></pre></td></tr></table></figure>

<h1 id="七、升级acme-sh"><a href="#七、升级acme-sh" class="headerlink" title="七、升级acme.sh"></a>七、升级acme.sh</h1><p>acme.sh 正在不断开发，因此强烈建议使用最新的代码。</p>
<p>您可以将 acme.sh 更新到最新代码：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --upgrade</span><br></pre></td></tr></table></figure>
<p>您还可以启用自动升级：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --upgrade --auto-upgrade</span><br></pre></td></tr></table></figure>
<p>然后acme.sh将自动保持更新。</p>
<p>禁用自动升级：</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">acme.sh --upgrade --auto-upgrade 0</span><br></pre></td></tr></table></figure>
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/Linux/" rel="tag"><i class="fa fa-tag"></i> Linux</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/archives/5f48daf9.html" rel="prev" title="Python连接MySql并插入数据操作详解">
      <i class="fa fa-chevron-left"></i> Python连接MySql并插入数据操作详解
    </a></div>
      <div class="post-nav-item">
    <a href="/archives/dd72fc91.html" rel="next" title="如何部署Vue项目到Centos服务器">
      如何部署Vue项目到Centos服务器 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%80%E3%80%81acme-sh%E7%AE%80%E4%BB%8B"><span class="nav-number">1.</span> <span class="nav-text">一、acme.sh简介</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%AE%89%E8%A3%85-acme-sh"><span class="nav-number">2.</span> <span class="nav-text">二、安装 acme.sh</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%89%E3%80%81%E7%94%9F%E6%88%90%E8%AF%81%E4%B9%A6"><span class="nav-number">3.</span> <span class="nav-text">三、生成证书</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-http-%E6%96%B9%E5%BC%8F"><span class="nav-number">3.0.1.</span> <span class="nav-text">1. http 方式</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81dns%E6%96%B9%E5%BC%8F"><span class="nav-number">3.0.2.</span> <span class="nav-text">2、dns方式</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9B%9B%E3%80%81%E5%AE%89%E8%A3%85%E8%AF%81%E4%B9%A6"><span class="nav-number">4.</span> <span class="nav-text">四、安装证书</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1%E3%80%81%E5%88%9B%E5%BB%BA%E5%AD%98%E6%94%BE%E8%AF%81%E4%B9%A6%E7%9A%84%E6%96%87%E4%BB%B6%E5%A4%B9"><span class="nav-number">4.0.1.</span> <span class="nav-text">1、创建存放证书的文件夹</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2%E3%80%81%E5%AE%89%E8%A3%85%E8%AF%81%E4%B9%A6"><span class="nav-number">4.0.2.</span> <span class="nav-text">2、安装证书</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%BA%94%E3%80%81%E9%85%8D%E7%BD%AESSL%E8%AF%81%E4%B9%A6"><span class="nav-number">5.</span> <span class="nav-text">五、配置SSL证书</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%85%AD%E3%80%81%E6%9B%B4%E6%96%B0%E8%AF%81%E4%B9%A6"><span class="nav-number">6.</span> <span class="nav-text">六、更新证书</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E4%B8%83%E3%80%81%E5%8D%87%E7%BA%A7acme-sh"><span class="nav-number">7.</span> <span class="nav-text">七、升级acme.sh</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="John Doe"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">John Doe</p>
  <div class="site-description" itemprop="description">不积跬步，无以至千里；不积小流，无以成江海。</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">47</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">8</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">32</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2025</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">John Doe</span>
</div>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  















  

  

</body>
</html>
